/*
-----------------------------------------------------------------------------
Filename:    Enemy.h
-----------------------------------------------------------------------------
*/
#ifndef __Enemy_h_
#define __Enemy_h_

#include <OGRE/Ogre.h>

#include "BaseApplication.h"

// Collision System
#include "CollisionTools.h"

class Enemy
{
public:

	// Constructor
	Enemy(Ogre::SceneManager* sceneMgr, MOC::CollisionTools* mCollisionTools, int index);

	// move the Enemy
	void moveEnemy(const Ogre::FrameEvent& evt);
		
	// Enemy variables
	Ogre::SceneNode* enemyNode;
	Ogre::Entity* enemyEntity;
	Ogre::Vector3 moveDirection;
	Ogre::Real enemySpeed;
	float life;
	bool isAlive;

	void damage(float damage);

	
	// Animation system
	Ogre::AnimationState *anim_walk, *anim_shoot, *anim_dead;
	void processAnimations(const Ogre::FrameEvent& evt);

	// particles
	Ogre::ParticleSystem *smokeParticles;
	
private:

	void loadModel(int i);
	void setupParticles(int i);

	Ogre::SceneManager* mSceneMgr;
	MOC::CollisionTools* mMOC;
};

#endif 
